#ifndef THINK_THINK_CONTROLLER_YAR_H
#define THINK_THINK_CONTROLLER_YAR_H

static char* think_controller_yar =
	"\n"
	"// +----------------------------------------------------------------------\n"
	"// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]\n"
	"// +----------------------------------------------------------------------\n"
	"// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.\n"
	"// +----------------------------------------------------------------------\n"
	"// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )\n"
	"// +----------------------------------------------------------------------\n"
	"// | Author: liu21st <liu21st@gmail.com>\n"
	"// +----------------------------------------------------------------------\n"
	"\n"
	"namespace think\\controller;\n"
	"\n"
	"/**\n"
	" * ThinkPHP Yar控制器类\n"
	" */\n"
	"abstract class Yar\n"
	"{\n"
	"\n"
	"    /**\n"
	"     * 构造函数\n"
	"     * @access public\n"
	"     */\n"
	"    public function __construct()\n"
	"    {\n"
	"        //控制器初始化\n"
	"        if (method_exists($this, \'_initialize\')) {\n"
	"            $this->_initialize();\n"
	"        }\n"
	"\n"
	"        //判断扩展是否存在\n"
	"        if (!extension_loaded(\'yar\')) {\n"
	"            throw new \\Exception(\'not support yar\');\n"
	"        }\n"
	"\n"
	"        //实例化Yar_Server\n"
	"        $server = new \\Yar_Server($this);\n"
	"        // 启动server\n"
	"        $server->handle();\n"
	"    }\n"
	"\n"
	"    /**\n"
	"     * 魔术方法 有不存在的操作的时候执行\n"
	"     * @access public\n"
	"     * @param string $method 方法名\n"
	"     * @param array $args 参数\n"
	"     * @return mixed\n"
	"     */\n"
	"    public function __call($method, $args)\n"
	"    {}\n"
	"}\n"
	"\n"
;
#endif